package logger;

import org.apache.log4j.Logger;

/**
 * Implementación de Excepcion Logger
 * @author DiegoAlejandro
 *
 */
public class ExceptionLoggerImpl implements ExceptionLogger{
	private Logger logger;
	
	public ExceptionLoggerImpl(){
		super();
	}
	
	public ExceptionLoggerImpl(Logger logger) {
		super();
		this.logger = logger;
	}

	@Override
	public void logExceptionFatal(Exception e) {
		this.logger.fatal(e.getMessage(), e);
	}

	@Override
	public void logExcpetionError(Exception e) {
		this.logger.error(e.getMessage(), e);
		
	}

	@Override
	public void setLogger(Logger logger) {
		this.logger = logger;
		
	}

	@Override
	public Logger getLogger() {
		return this.logger;
	}
	
}
